Skip to content

Conversation

shaltielshmid
Copy link
Contributor

1] Updated tgi_model to inherit from LightevalModel, including implementing all the abstract properties. Since the TGIClient and the InferenceClient produce the same format (since they both use TGI), I had TGIClient inherit from InferenceClient, and then just override the functions that use the client. In order to do that, I had to update the private functions in InferenceClient to use one underscore so the names aren't obfuscated.

2] Added two optional fields to the endpoint_model config - specifying the image_url and allowing for any other environment variables. This will allow users to update to later versions of the TGI container without having to rebuild, or to specify other properties like max_input_tokens.

Copy link
Member

@clefourrier clefourrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this LGTM!
It would be great if you could add some doc on the relevant parameters you added + edited the README to explain how to launch the different model types now

@clefourrier
Copy link
Member

Can you fix the style using ruff too?

@shaltielshmid
Copy link
Contributor Author

Done! Please let me know what you think of the additions to the README.

@clefourrier
Copy link
Member

This is great, thank you!

@clefourrier clefourrier merged commit 7fcaab3 into huggingface:main Jul 4, 2024
hynky1999 pushed a commit to hynky1999/lighteval that referenced this pull request Jul 12, 2024
…e#208)

* Added image url parameter

* Fixed up tgi model config

* Undid tgi available check

* Adjust tgi parameter names, and checked for attr existence

* Fixed task Id in argparse

* Removed obfuscation from private functions, to allow inheritance to override

* Updated tgi model to inherit from endpoint and just modify client calls

* Added option to specify model id in config for tgi model

* Added option to specify custom env vars

* Updated env vras

* Applied ruff format

* Added docs + readme

* Ruff format
hynky1999 pushed a commit that referenced this pull request May 22, 2025
* Added image url parameter

* Fixed up tgi model config

* Undid tgi available check

* Adjust tgi parameter names, and checked for attr existence

* Fixed task Id in argparse

* Removed obfuscation from private functions, to allow inheritance to override

* Updated tgi model to inherit from endpoint and just modify client calls

* Added option to specify model id in config for tgi model

* Added option to specify custom env vars

* Updated env vras

* Applied ruff format

* Added docs + readme

* Ruff format
NathanHB pushed a commit that referenced this pull request Sep 19, 2025
* Added image url parameter

* Fixed up tgi model config

* Undid tgi available check

* Adjust tgi parameter names, and checked for attr existence

* Fixed task Id in argparse

* Removed obfuscation from private functions, to allow inheritance to override

* Updated tgi model to inherit from endpoint and just modify client calls

* Added option to specify model id in config for tgi model

* Added option to specify custom env vars

* Updated env vras

* Applied ruff format

* Added docs + readme

* Ruff format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants